home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / X11 / Xaw / AsciiSrcP.h < prev    next >
C/C++ Source or Header  |  2006-04-12  |  5KB  |  146 lines

  1. /*
  2. * $Xorg: AsciiSrcP.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $
  3. */
  4.  
  5.  
  6. /***********************************************************
  7.  
  8. Copyright 1987, 1988, 1994, 1998  The Open Group
  9.  
  10. Permission to use, copy, modify, distribute, and sell this software and its
  11. documentation for any purpose is hereby granted without fee, provided that
  12. the above copyright notice appear in all copies and that both that
  13. copyright notice and this permission notice appear in supporting
  14. documentation.
  15.  
  16. The above copyright notice and this permission notice shall be included in
  17. all copies or substantial portions of the Software.
  18.  
  19. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  22. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  23. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  24. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25.  
  26. Except as contained in this notice, the name of The Open Group shall not be
  27. used in advertising or otherwise to promote the sale, use or other dealings
  28. in this Software without prior written authorization from The Open Group.
  29.  
  30.  
  31. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
  32.  
  33.                         All Rights Reserved
  34.  
  35. Permission to use, copy, modify, and distribute this software and its 
  36. documentation for any purpose and without fee is hereby granted, 
  37. provided that the above copyright notice appear in all copies and that
  38. both that copyright notice and this permission notice appear in 
  39. supporting documentation, and that the name of Digital not be
  40. used in advertising or publicity pertaining to distribution of the
  41. software without specific, written prior permission.  
  42.  
  43. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  44. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  45. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  46. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  47. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  48. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  49. SOFTWARE.
  50.  
  51. ******************************************************************/
  52. /* $XFree86: xc/lib/Xaw/AsciiSrcP.h,v 1.8 2001/01/17 19:42:25 dawes Exp $ */
  53.  
  54. /*
  55.  * AsciiSrcP.h - Private Header for Ascii Text Source.
  56.  *
  57.  * This is the private header file for the Ascii Text Source.
  58.  * It is intended to be used with the Text widget, the simplest way to use
  59.  * this text source is to use the AsciiText Object.
  60.  *
  61.  * Date:    June 29, 1989
  62.  *
  63.  * By:      Chris D. Peterson
  64.  *          MIT X Consortium 
  65.  *          kit@expo.lcs.mit.edu
  66.  */
  67.  
  68. #ifndef _XawAsciiSrcP_h
  69. #define _XawAsciiSrcP_h
  70.  
  71. #include <X11/Xaw/TextSrcP.h>
  72. #include <X11/Xaw/AsciiSrc.h>
  73.  
  74. #ifdef L_tmpnam
  75. #define TMPSIZ L_tmpnam
  76. #else
  77. #ifdef PATH_MAX
  78. #define TMPSIZ PATH_MAX
  79. #else
  80. #define TMPSIZ 1024        /* bytes to allocate for tmpnam */
  81. #endif
  82. #endif
  83.  
  84. typedef struct _Piece {        /* Piece of the text file of BUFSIZ allocated 
  85.                    characters */
  86.     char *text;            /* The text in this buffer */
  87.     XawTextPosition used;    /* The number of characters of this buffer 
  88.                    that have been used */
  89.     struct _Piece *prev, *next;    /* linked list pointers */
  90. } Piece;
  91.  
  92. typedef struct _AsciiSrcClassPart {
  93.     XtPointer extension;
  94. } AsciiSrcClassPart;
  95.  
  96. /* Full class record */
  97. typedef struct _AsciiSrcClassRec {
  98.     ObjectClassPart     object_class;
  99.     TextSrcClassPart    text_src_class;
  100.     AsciiSrcClassPart    ascii_src_class;
  101. } AsciiSrcClassRec;
  102.  
  103. extern AsciiSrcClassRec asciiSrcClassRec;
  104.  
  105. /* New fields for the AsciiSrc object */
  106. typedef struct _AsciiSrcPart {
  107.     /* resources */
  108.     char *string;        /* either the string, or the
  109.                    file name, depending upon the type */
  110.     XawAsciiType type;        /* either string or disk */
  111.     XawTextPosition piece_size;    /* Size of text buffer for each piece */
  112.     Boolean data_compression;    /* compress to minimum memory automatically
  113.                    on save? */
  114. #ifdef OLDXAW
  115.     XtCallbackList callback;
  116. #endif
  117.     Boolean use_string_in_place;/* Use the string passed in place */
  118.     int ascii_length;        /* length field for ascii string emulation */
  119.  
  120. #ifdef ASCII_DISK
  121.     String filename;        /* name of file for Compatability */
  122. #endif /* ASCII_DISK */
  123.  
  124.     /* private */
  125.     Boolean is_tempfile;    /* Is this a temporary file? */
  126. #ifdef OLDXAW
  127.     Boolean changes;
  128. #endif
  129.     Boolean allocated_string;    /* Have I allocated the
  130.                    string in ascii_src->string? */
  131.     XawTextPosition length;     /* length of file */
  132.     Piece *first_piece;        /* first piece of the text */
  133. #ifndef OLDXAW
  134.     XtPointer pad[4];    /* for future use and keep binary compatability */
  135. #endif
  136. } AsciiSrcPart;
  137.  
  138. /* instance record */
  139. typedef struct _AsciiSrcRec {
  140.     ObjectPart    object;
  141.     TextSrcPart   text_src;
  142.     AsciiSrcPart  ascii_src;
  143. } AsciiSrcRec;
  144.  
  145. #endif /* _XawAsciiSrcP_h */ 
  146.